<?php
class Model_LibraryAcl extends Zend_Acl{
    public function __construct(){
        $this->add(new Zend_Acl_Resource('index'));
        
        $this->add(new Zend_Acl_Resource('noticias'));
        $this->add(new Zend_Acl_Resource('ver'),'noticias');
        
        $this->add(new Zend_Acl_Resource('noticias'));
        $this->add(new Zend_Acl_Resource('agregar'),'noticias');
        $this->add(new Zend_Acl_Resource('listar'),'noticias');
        
        $this->addRole(new Zend_Acl_Role('usuario'));
        $this->addRole(new Zend_Acl_Role('administrador'),'usuario');
        
        $this->allow('usuario','index');
        $this->deny('usuario','agregar,listar');
        $this->allow('usuario','noticias','ver');
        $this->allow('administrador','noticias','agregar');
        $this->allow('administrador','noticias','listar');
    }
}